#!/bin/bash
# EGW CRE 2008 Instance
# Copyright 2010, Michael Prewitt
# version 1.5

# See if the file exists in the standard location
if [ -e "/Applications/EGW CRE 2008.app" ]
then
  EGWDIR="/Applications/EGW CRE 2008.app"
else
  # ...or else find it with Spotlight, GREP for first match
  EGWDIR=`mdfind "EGW CRE 2008.app" | grep -m 1 "EGW CRE 2008.app"`
fi

# If we didn't find anything, report error; otherwise launch app
if [ "$EGWDIR" ] 
then
  open -n "$EGWDIR"
else
  echo "Could not locate EGW CRE 2008. Did you move or rename it?"
fi

exit
